<template>
  <div class="home m-0.5 text-xl">hooks使用示例</div>
  <div>{{ x }}{{ y }}</div>
  <div>
    {{position}}
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue'
import useMouse from '@/hooks/useMouse'

export default defineComponent({
  name: 'analysis',
  setup() {
    const { x, y } = useMouse()
    const position = reactive(useMouse())
    return {
      x,
      y,
      position
    }
  }
})
</script>
